  // pages/item-index/item-index.js
  Component({
      /**
       * 组件的属性列表
       */
      properties: {
        goodsList:{
          type:Array,
          value:[],
          observer(newVal,oldVal,changePath){
            console.log(newVal,oldVal,changePath)
          }
        }
      },

      methods: {
        // 跳转到商品详情页
        navToGoodsDetail(e){
          console.log('跳转到商品详情页',e.currentTarget.dataset.id);
          wx.navigateTo({
            url: `/pages/goods_detail/goods_detail?goodsId=${e.currentTarget.dataset.id}`,
          });
        },
      },


     
  })
